package com.peas.platform.module.icims.budget.apply.adapter.repository.po;

import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 一上预算
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_budget_one`")
public class BudgetOnePo extends BasePo {

    // 二级项目ID
    // （二级项目表）外键
    @Comment(value = "二级项目ID")
    @TableField(value = "`project_two_id`", jdbcType = JdbcType.BIGINT)
    private Long projectTwoId;

    // 项目编制编码
    @Comment(value = "项目编制编码")
    @Size(max = 50, message = "项目编制编码不能超过50个字符")
    @TableField(value = "`code`", jdbcType = JdbcType.VARCHAR)
    private String code;

    // 项目编制名称
    // 基本信息
    @Comment(value = "项目编制名称")
    @Size(max = 100, message = "项目编制名称不能超过100个字符")
    @TableField(value = "`name`", jdbcType = JdbcType.VARCHAR)
    private String name;

    // 存续状态
    // 选择框
    // 字典取值:BudgetProjectViability
    @Comment(value = "存续状态", dictType = "BudgetProjectViability")
    @Size(max = 20, message = "存续状态不能超过20个字符")
    @TableField(value = "`viability`", jdbcType = JdbcType.VARCHAR)
    private String viability;

    // 项目来源
    // 选择框
    // 字典取值:BudgetProjectSource
    @Comment(value = "项目来源", dictType = "BudgetProjectSource")
    @Size(max = 20, message = "项目来源不能超过20个字符")
    @TableField(value = "`source`", jdbcType = JdbcType.VARCHAR)
    private String source;

    // 项目属性
    // 新增项目、持续项目、跨年度项目
    // 字典取值:BudgetProjectAttribute
    @Comment(value = "项目属性", dictType = "BudgetProjectAttribute")
    @Size(max = 20, message = "项目属性不能超过20个字符")
    @TableField(value = "`attribute`", jdbcType = JdbcType.VARCHAR)
    private String attribute;

    // 申请财政总额
    @Comment(value = "申请财政总额")
    @TableField(value = "`total_fund`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal totalFund;

    // 社会投入资金
    @Comment(value = "社会投入资金")
    @TableField(value = "`putin_fund`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal putinFund;

    // 当年资金
    @Comment(value = "当年资金")
    @TableField(value = "`curr_fund`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal currFund;

    // 资金性质
    @Comment(value = "资金性质")
    @Size(max = 20, message = "资金性质不能超过20个字符")
    @TableField(value = "`fund_type`", jdbcType = JdbcType.VARCHAR)
    private String fundType;

    // 用款单位ID
    // （单位表）外键
    @Comment(value = "用款单位ID")
    @TableField(value = "`use_gov_id`", jdbcType = JdbcType.BIGINT)
    private Long useGovId;

    // 申报单位ID
    // （单位表）外键
    @Comment(value = "申报单位ID")
    @TableField(value = "`apply_gov_id`", jdbcType = JdbcType.BIGINT)
    private Long applyGovId;

    // 上一年项目预算安排情况
    @Comment(value = "上一年项目预算安排情况")
    @Size(max = 200, message = "上一年项目预算安排情况不能超过200个字符")
    @TableField(value = "`previous_arrange`", jdbcType = JdbcType.VARCHAR)
    private String previousArrange;

    // 主管部门ID
    // 【预算主管部门】
    @Comment(value = "主管部门ID")
    @TableField(value = "`manager_org_id`", jdbcType = JdbcType.BIGINT)
    private Long managerOrgId;

    // 主管部门联系人
    @Comment(value = "主管部门联系人")
    @Size(max = 20, message = "主管部门联系人不能超过20个字符")
    @TableField(value = "`manager_name`", jdbcType = JdbcType.VARCHAR)
    private String managerName;

    // 主管部门联系电话
    @Comment(value = "主管部门联系电话")
    @Size(max = 20, message = "主管部门联系电话不能超过20个字符")
    @TableField(value = "`manager_user_contact`", jdbcType = JdbcType.VARCHAR)
    private String managerUserContact;

    // 项目实施单位ID
    // （单位表）外键
    @Comment(value = "项目实施单位ID")
    @TableField(value = "`work_gov_id`", jdbcType = JdbcType.BIGINT)
    private Long workGovId;

    // 项目负责人ID
    // （用户表）外键
    @Comment(value = "项目负责人ID")
    @TableField(value = "`work_user_id`", jdbcType = JdbcType.BIGINT)
    private Long workUserId;

    // 项目负责人联系方式
    @Comment(value = "项目负责人联系方式")
    @Size(max = 20, message = "项目负责人联系方式不能超过20个字符")
    @TableField(value = "`work_user_contact`", jdbcType = JdbcType.VARCHAR)
    private String workUserContact;

    // 状态
    // 0保存、1提交审批、2审批通过、3审批驳回、4撤回
    @Comment(value = "状态")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 起始年度
    @Comment(value = "起始年度")
    @Size(max = 4, message = "起始年度不能超过4个字符")
    @TableField(value = "`start_time`", jdbcType = JdbcType.VARCHAR)
    private String startTime;

    // 终止年度
    @Comment(value = "终止年度")
    @Size(max = 4, message = "终止年度不能超过4个字符")
    @TableField(value = "`end_time`", jdbcType = JdbcType.VARCHAR)
    private String endTime;

    // 项目概述
    @Comment(value = "项目概述")
    @TableField(value = "`summarize`", jdbcType = JdbcType.CLOB)
    private String summarize;

    // 设立依据及申报理由
    @Comment(value = "设立依据及申报理由")
    @TableField(value = "`reason`", jdbcType = JdbcType.CLOB)
    private String reason;

    // 是否债券可用项目
    // 字典取值:BudgetProjectDebenture
    @Comment(value = "是否债券可用项目", dictType = "BudgetProjectDebenture")
    @Size(max = 20, message = "是否债券可用项目不能超过20个字符")
    @TableField(value = "`is_debenture`", jdbcType = JdbcType.VARCHAR)
    private String isDebenture;

    // 是否科研项目
    // 枚举取值:CommonYesNo
    @Comment(value = "是否科研项目", enumType = "CommonYesNo")
    @Size(max = 20, message = "是否科研项目不能超过20个字符")
    @TableField(value = "`is_scientific`", jdbcType = JdbcType.VARCHAR)
    private String isScientific;

    // 是否基建项目
    // 枚举取值:CommonYesNo
    @Comment(value = "是否基建项目", enumType = "CommonYesNo")
    @Size(max = 20, message = "是否基建项目不能超过20个字符")
    @TableField(value = "`is_construction`", jdbcType = JdbcType.VARCHAR)
    private String isConstruction;

    // 基建立项情况
    // 选择框
    // 字典取值:BudgetProjectConstruction
    @Comment(value = "基建立项情况", dictType = "BudgetProjectConstruction")
    @Size(max = 20, message = "基建立项情况不能超过20个字符")
    @TableField(value = "`construction_desc`", jdbcType = JdbcType.VARCHAR)
    private String constructionDesc;

    // 是否代建项目
    // 枚举取值:CommonYesNo
    @Comment(value = "是否代建项目", enumType = "CommonYesNo")
    @Size(max = 20, message = "是否代建项目不能超过20个字符")
    @TableField(value = "`is_agent`", jdbcType = JdbcType.VARCHAR)
    private String isAgent;

    // 代建单位ID
    // （单位表）外键
    @Comment(value = "代建单位ID")
    @TableField(value = "`agent_gov_id`", jdbcType = JdbcType.BIGINT)
    private Long agentGovId;

    // 是否政府采购
    // 1是，0否
    // 枚举取值:CommonYesNo
    @Comment(value = "是否政府采购", enumType = "CommonYesNo")
    @Size(max = 20, message = "是否政府采购不能超过20个字符")
    @TableField(value = "`is_government_purchase`", jdbcType = JdbcType.VARCHAR)
    private String isGovernmentPurchase;

    // 项目绩效总目标
    // 绩效目标总目标
    @Comment(value = "项目绩效总目标")
    @TableField(value = "`target_all`", jdbcType = JdbcType.CLOB)
    private String targetAll;

    // 项目绩效本年度目标
    // 绩效目标本年度目标
    @Comment(value = "项目绩效本年度目标")
    @TableField(value = "`target_current`", jdbcType = JdbcType.CLOB)
    private String targetCurrent;

    // 一上申请金额
    // 一下控制时写入（完成状态）
    @Comment(value = "一上申请金额")
    @TableField(value = "`apply_one_fund`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal applyOneFund;

    // 一下控制金额
    @Comment(value = "一下控制金额")
    @TableField(value = "`approve_one_fund`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal approveOneFund;

}
